package com.nbpt;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.nbpt.db.AccountDBHelp;

public class gerenxinxi extends Activity {
    TextView username;
    TextView xb;
    TextView phone;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gerenxinxi);

        username=findViewById(R.id.id);
        xb=findViewById(R.id.xb);
        phone=findViewById(R.id.phone);
        AccountDBHelp helper = new AccountDBHelp(gerenxinxi.this,AccountDBHelp.VERSION_1);
        Cursor cursor = helper.select(null,null);
        cursor.move(Integer.parseInt(SmartCity.userid));
        username.setText(cursor.getString(1));
        if (cursor.getString(5).equals("0"))
        {
            xb.setText("男");
        }
        else if (cursor.getString(5).equals("1"))
        {
            xb.setText("女");
        }
        phone.setText(cursor.getString(3));



    }
}
